package cn.levi.sensitive.annotations;

import cn.levi.sensitive.configuration.SensitiveDeserialize;
import cn.levi.sensitive.configuration.SensitiveProperties;
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 检查是否包含敏感词
 *
 * @author lei
 * @since 2025/2/18
 */
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@JacksonAnnotationsInside
@JsonDeserialize(using = SensitiveDeserialize.class)
public @interface Sensitive {

	/**
	 * 报错提示,可以填充一个参数，参数为敏感字符的列表
	 */
	String value() default "参数包含敏感字符：{}";
}
